package com.woniuxy.yoga.evaluate.client;


import com.woniuxy.yoga.commons.core.model.Result;
import com.woniuxy.yoga.evaluate.model.dto.orderinfo.OrderInfoDto;
import com.woniuxy.yoga.evaluate.model.form.orderinfo.UpdateEvaluateStateForm;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

@FeignClient(name = "order-service",path = "/order")
public interface OrderClient {

    /**
     * 通过订单编号返回订单信息
     * @param orderNum
     * @return
     */
    @GetMapping("/orderInfo/getByOrderNum/{orderNum}")
    public Result<OrderInfoDto> getByOrderNum(@PathVariable("orderNum") String orderNum);

    /**
     * 修改订单为已评价状态
     * @param form 参数
     * @return
     */
    @PostMapping("/orderInfo/updateEvaluateState")
    public Result<?> updateEvaluateState(@RequestBody UpdateEvaluateStateForm form);

}
